SSGS refactoring