Working branch for hooking this to a database.

-Lots to do, but for now we have some basic methods.