Updated to work with CakePHP 2.x