Break up prettyNumber into smaller functions