Remove some unused code, and extract max number of digits and update test case for finger print generation.