quickfix mirror for zookeeper sources;refactoring code