Don't overflow counters on 32-bit systems

close #6
Fixed incorrect error message in failed test
Refactored common big stuff into big.go