Improved the genericBaseConvert function to drop the leading zeroes.