Setup model and database