refactor to provide API for Zenoss collector plugins