WIP: Modified visits_controller.rb and fixed some namespace issues

All tests are passing on my end, though I'd advise a quick code review before merging.