cleaning up element implementation callbacks
realize_cb -> attached_cb

also, add detached_cb.