Refactored the parse and transformation logic in Schema.