Major refactoring across the program
Authored by: mikebeblack 2015-08-08
Parent: [r172]
Child: [r174]