Changes to attack code, also framework for unit models