Moved files to client
Changed db loading to be synchronous