While waiting for my students at QUT I've added in the other code from the weekend.