Refactor MessageHandler & handle partial handshakes