Migrated a lot of basic logic and adapted views to begin work on porting from CakePHP 2.5.1