removing debug code
fixing disconnect bug
refactoring heartbeat into cluster