Move sorting (mostly) into Course