Fixed Javascript to populate courses from JSON