Added some optimizations on animit.js.