Begin refactoring of HPT.hs
Math library note.
Note changes.