Added support for CommonJS and AMD, added JS header
Added debug parameter (log URI's on/off)