Homeland AI Tweaks

Giant slew of bugfixes and new functions, check AuI.h for more details.