fix broken tests for #448
fix cucumber test for issue #645
Merge branch 'master' of github.com:locomotivecms/engine
code climate asked us to refactor those files