Add more documentation and code cleanup

Change-Id: I3bbdd524fdb882f5edd0a0bf5b1efe3321949253
Merge "Add more documentation and code cleanup"