quickfix mirror for zookeeper sources;refactorin code