refactoring the runner a bit
turn off signals in the initial protocol handshake
fix a few bugs. centralize output flushing