Modularized code + started using r.js to optimize build.