Moved animation state machines to scripts