Tidied up code.

Make it more conformant, replace raw float comparisons with
WFMath::Equals and other smaller fixes.
This really doesn't add much, but I sometimes find this kind of work
relaxing when tackling more complex issues.