Prunes some useless code and some style fixes.

Also slightly modifies the battlefield terrain generator.