Refactored new and edit pages form