Refactoring front end for conformance to rails views and templates