Refactoring / improve split string