Add support for attributes.
Handle attributes correctly.