zorpctl: modifying code to be more testable