Misc cleanup, add disconnect to client