Refactored animation management