Updating: tidying up some animation code