Fixed several trivial bugs.  This runs with plot sets 1 and 5, at least.