move main.js file
fix references
move server conf in the Constants file
add r.js build conf file