Refactor splitting of strings into Utility class