Made initing db automatic