* Removed `extract` function, escaped attributes, and refactored conditional checks