Move querying functionality to Course