Added detach and contains methods