cleaning up bigint and mediumint code.