Refactored _attributes to store a mapping of attribute name to attribute methods