major refactor of zkconsumer