Fixed numerous bugs and started secret locs.

Only a few small additions, testing, and a bit of cleaning up remain
before shipping!