Merge pull request #38 from SlrG/master

Various fixes and enhancements.
Merge pull request #39 from SlrG/master

Rounding wasn't working as expected. Had to rework.