Attempting refactor to enhance maintainablility
Attempting refactor to enhance maintainability
Major refactor for readability and maintenance