Use requirejs.
More improvement.
bug fixes.