Overhauling the Battle engine