Cakephp patch

I believe this closes out #697, finishes the work from #960. Doesn't yet include #682