Added id parameter to AnimationFactory constructor.
Adjust the code accordingly