includes fixes and suggestions from code review