Refactoring get script