Little code tweaks, nothing signficant.
Ran the whole app through a bug sniffer and fixed everything it found.
Mostly got rid of unneccessary casts and unused calls.  Made brain and
brainspec abstract.