Added attach and detach methods in cases where connect and disconnect aren't appropriate