Progress on the v.2.0

* Updates to metadata classes to match the next database format.
* Started fixing the test cases so that they work standalone.
* Misc cleanup things.