Fix predefs and battle code.