Implemented cancel button and added ping timeouts
Fixed removal of listeners on process termination