added missing semicolons
added index.js to export as a module
debug module is moved to dependencies
adding tedious TYPES to the request parameters

previously parameter.type (text value of the type) is added to the
request parameters but that was incorrect. It is required to added
TYPES[parameter.type].