Added in commits from @hlorofos to add 9 digit support, and added tests to support the changes.