Updated animation code, mostly complete