Added comments and cleaned up a bit
Changed logic for bulk creation to capture individual errors
Fixed defect in total revenue calculation
Moved total revenue logic to only be calculated upon successful record creation