Refactored setup