Our complete code base is included here for replicability. The code closely matches the state diagrams, and uses Ed's events and services framework. Access it by following this link.