Use insert-before.
Add macro for boxing up attribute values as functions.