Set up database and models