Attempted refactor of animation