Refactor AttributesCaster