Use consistent logic when looking for attribute values on element or on parent, add this functionality to all attributes that it makes sense on and document it.
Bulk update example
Add additional unit tests around forms