Moves contacts db initialization to new function