Start for reworking ai

too messy so i started from scratch