Added ci integration tests, updated return value documentation and refactored to simplify code. Change-Id: If8a1145a31d685d41367383930e6fd08d64c6ae8 (cherry picked from commit 1d22a94a90)
1d22a94a90