Refactoring - extract method into new class for reuse