Some cleanups to your last commit

The `return f.protocol.handshakeDone` part made it not work for me, the rest is just cleanups.  Thanks!