Most of Database layer and Empty Application Framework class.

All of the database layer except for the References table and the Keywords table. May have bugs, but tested superficially to work.