animator.js

Updating the structure of code.