Refactored logic into model. Add rspec (not working with Fabricator yetgit add .)