Upgraded to app/ from CakePHP 2.4.6 and adapted