refactoring skeletal animation