Code review

Thought I might as well PR these changes.