Fixed the animation handler and added a sample

- Will add more to the animation sample