Code duplation moved to new class