Started animation code from Pat's code base.