Fix issue #80. Numeric algorithms are reversed from postgresql sources.
Cleanup and final fixes for the issue