Yep. This was from before I realised having a leadingZero variable made things a lot simpler. I might even change it to count the number of leading zeros so it works better for numbers like 0.04.