Refactored legacy code, added attribute parser