General code cleanup
 - Removed duplicate code.
 - Formatted code
Merge branch 'master' of https://github.com/mattiascibien/SuperbEdit