Merge pull request #1 from bgrimstad/development

Updated development branch from bgrimstad
Implemented structured exceptions

Removed all usages of exit and replaced them with exceptions. I also
added a tiny bit of formatting in a few places and changed a bit of
Boolean logic.

The relative error tolerance is also now the inverse of the epsilon,
which is slightly smaller than what it was before.
Revert change from last commit

The epsilon idea was bad and slipped by my testing.
Made all internal logging debug-only
Updated dev branch with upstream
Postmortem fixes

from the upstream update
Merge pull request #6 from novacrazy/development

Exceptions and debug output cleanup