Refactor: ExtractClass to remove Code Duplication