Refactored, added rspec