Misc fixes, finalized empty database initilization