Refactor extension