Add DB initialization logic
Minor fix regarding inserting initial data to db