Arjun-code review and fixes

Fixed minor issues in the code.