added comments, and code clean up

Signed-off-by: Raj Khatri <raj@clearbridgemobile.com>