Refactor XYZ operators