Updates from code review, polish style

These are the changes we went over during the code review. Also included a few style updates.