refactored Animation code into simpiler constructor