Tidy up some imports and file opening.
Moved heat caching to the Point class, where it belongs.
Removed pre-computed constants.

Computing them at run time is more than fast enough, and the code is
less mysterious this way.