Refactored document creation form