refactoring in preperation for new animation system