Improved animation code

Added reset functions to reset the animation vars back to their default.
Also other minor improvements to animation code.