Added Module API to import and export modules. Refactored class.js into a javascript module file.