Formatting fixes, re-enabled factions enemy and ally detect. No testing
on anything, also built with latest dependancies.