CodePro Edits

Refactors a lot of code so that codepro is happy.

Author: Shockolate