Refactoring for Rails 4, somewhat working, formatting issues