Refactor. tokenize input line