Code refactored to allow for testing of master responding when ZK isn't ...

...running
I know this isn't your fault, but since you're here, please make this final.