Call wait() in while loop
Use Set for Handshaker
Some cleanup
Use precompiled Pattern for performance reasons
Replace concat with +