I would greatly appreciate any comments, corrections, and even alternate versions for the following translation.
At midnight the famous general set out from his camp to seize the strong position which he had examined six hours earlier, before the enemy could notice, weary as they were with fighting and marching. And so, when the three cohorts had been led around by a secret route, he was able to draw up his front line under the low rampart itself and give the signal to advance. The terrified enemy had never expected to see armed men in their rear, and fearing that they might be attacked on both sides at once, they threw down their arms: they knew not where to look for help and they would not have had any hope of safety if they had not used all speed and fled each to his own home.
Ille imperator, antequam hostes pugna itinereque fessi eum animadverterent, media nocte e castris profectus est ad castellum abhinc sex horas inspectum capessendum. itaque, tribus cohortibus occulta semita circumductis, cum primores sub ipsum demissum vallum instruendos curasset, signum intulit. numquam perterriti armatos conspectos in sua novissima expectarant hostes, qui cum timuerint ne possent simul utrimque oppugnari, deiecere arma: ignoravere enim quo auxilium peterent et nisi quisque quam citissime suae domui effugisset, desperasset salutem ullam.