Refactored setup into classmethod