more rspec tests (including controller tests) + fixes to controller

@spencereldred