#479. ApiFactory added.
Merge branch 'dev' of github.com:devbridge/BetterCMS into dev
Tests fixed.