Code now works with helsinki's protocol too.
Merged helsinki's protocol to master.