Create schema and history class.  Use these classes for checks and balances.  Cleanup some code to use appropriate methods and calls (e.g. public function vs. function, static calls to non-static methods, etc...)

git-svn-id: https://svn.code.sf.net/p/freeghost/code/trunk@1791 71f96598-fa45-0410-b640-bcd6f8691b32