Merge pull request #16 from jrfnl/master

Use bc_math for precision calculations - fixes issue #14
Minor bug fixes and tidying.
Allow Unit tests to play nice with IDEs