Added initial implementation of ZPoller. Some cleanup.