Setting up the framework

Setting up some of the basic files and structure. Some improvements to
the DB as well.