Converted the plugin so that it would work with Cakephp 2+