Refactored animation to be ng-animate compliant