refactor require config
optimise js with r.js