Refactored splitNumbers() for upcoming changes