minor code and rspec cleanup