Make division routine only do inc/dec on zero crossing, and other improvements