Convert class.js into requireJS module