Set up database and basic models