Added comments to animation code