added z axis rotation correction, more tuning work/fixes