Use BigInteger to avoid overflowing

Fixes #1
Merge branch 'issue/1' into dev
Bump version to 0.12.1
Merge branch 'dev'