First attempt to create a much faster version of the animation code.