Updated splitNumbers method to handle new lines and test