cleaning out config.c, there is too much code in there.
rules should be in their own modules. here:
upkeep is a concept all by itself, should have its own tests, etc.
movement code should be in move.c.
cleaning up some superfluous include directives.