Correct non-unique course validation; code cleanup; better error style.