Convert coffeescript to js
Implement module js pattern and add sugarjs