Refactoring code and moving form elements into partials