Remove unnecessary var, inline accsum_reset, lrintf , rename smallAngle