Merge "Refactoring: pull out script splitter with unit test" into main