Added delegate methods and added an animation example