NPC now waits until the player is moving quickly to become alerted.
Cleaned up AI code to be more in one place.