partial style refactor for controller.rb; check breakage