Refactor the code around zget a little to be cleaner and simpler.