Removed class duplication from animation code