Refactor things to take advantage of callbacks in animation.