code review and removal of warnings