Got the code working ready for testing against real zxtm nodes.