refactoring Zookeeper classes