courses page refactoring