General improvements including small fixes and updated comments

Change-Id: I96be5ae98c19cd7c485747bfce32dbd184444f3f