refactor: pulled parsing diff lines to dictionaries into new function