Added AnimationState clear.

id return value for factory methods.