Finished bigint bug fix and added tests.