Fully working program. RSpec not working though and program needs refactoring