Code review and improved documentation

Change-Id: Ib59a3d3374cff524256360a9dad1be410f262e33