Initial work on #39. Mainly on courses, but basic testing is
added for other types too.