Revert "move element's attributes into element.attributes"

This reverts commit de7c3fe97701a43829459444dc54f107670e61d6.