Updated attach/detach methods