Made database work, admin tool now creates and initialises database.