General code and comments cleanup. Minor refactors as per Code Analytics plugin.

Signed-off-by: Tushar Narayan <tusharnarayan@gmail.com>