Got database initialization working, need to speed up the process