rspec-ify tests; minor fixes to class