Misc changes after code review