animation class restructure