Moved DB out of project and unified storage interface. Also cleaned some code.