Possible fix for bigint() problem, some code-cleanups