More things
Merge branch 'master' of github.com:CodePilotCo/CMS
Made models global
Removed some SQL queries
Replaced some more complex queries.