Basic middleware, db, and views