Rewritten z module to load z from external submodule.