More major cleanup.

* Added comments to document the code flow.
* Removed a lot of testing code.
* Made sure that any database queries are now using custom Db class, which is used to abstract the interface of Aura.Sql (Mainly so plugin/theme devs don't need to worry about which venue is loaded. This is forward thinking, since we define one db interface that will be semi-consistent, in case we want to use a different database abstraction system in the future).
* Unset some variable that were no longer needed. Need to continue to focus on this.