first round of updates from code review