minor cleanup, some rspec tests