Incorporated the review feedback into the zpos patch and fixed up the other functions to return tuples