Add basic z ordering functionality.