Refactored checkout into new class