Massive heap of new code to do with database creation