Added definitions for AMD & CommonJS modules
Some style changes