Refactored Code Structure:
Reorganized the code to use helper functions to reduce complexity and improve readability.
Field Parsing:
Removed excessive nesting in the field parsing logic and introduced utility functions for repetitive tasks.
Handling Special Tags:
Segregated tag handling into dedicated functions for better maintainability.
Permissions & Default Values:
Improved permission setup and default value handling using clear helper methods.
Embedded Fields:
Added modular handling for embedded fields, making the code more concise and maintainable.