Pre-combat improvements

This doesn't fully implement combat, but it does have a number of cleanups and improvements that other people could work with (e.g. implement spell-casting).