A reorganized version of z_framework