Code review round 2

Changes from yesterday's code review