more of the mathces tutorial
some simple cleanup.