Refactor sets