Use bc_match for precision calculations - fixes issue #14

And some small efficiency tweaks