some refactoring and added anim file parser