Separated the html from the PHP in the system using a new view controller class and template files for each controller.