Added AIState, re-enabled movement.

Some really dirty code inside... I will fix them soon.