Lots of controller, database stuff, some tests