clean up header animation code