Added wrapper for AMD and CommonJS