Z Axis modifications

Some code changes to reflect the fact thtat the z axis does not work the
same as the other axes.