ui-router misadventures, and some couch db stuff