Timo's suggestions nearly complete.  Some bugs also squashed.