Improved method used to split an int to a digit array.

Closes #3