Refactored some of the rake tasks, added rspec