Refactor- removed duplication in freedom_registry_controller.rb and formatter.rb