Refactoring using GSObject