factor out #failure into application controller
prevenl SQL errors my checking for nils in input
lots of changes around resetting the db and loading test data