courses controller cleanup