clean and refactor sgf data