Adding RSpec tests, and controller updates