Refactoring saas