1) Fix formatting to comply with linux kernel standard.
2) Remove unused includes.
Changed roundoff correction frequency.
Move several static variables to a global structure which is
allocated only if the module runs.