renamed the file to more accurately describe its functionality.
code cleanup. added comments.
Added comments. Played with the tolerance.