rbuels edits

Jerven, you'll probably want to review and take or leave each commit, I tried to separate them by the nature of the change.