Submitted by: mfosterw
Went a little overboard with the clean code stuff (at the recommendation of a code quality plugin I was using)