clean up worm animation code a bit