Add back dispose and cleanup disconnect/dipose process

Signed-off-by: Jack Huey kitskub@gmail.com