fix extension of example 7
Dont call setup_response_handler if we have no callback

Add on 'error' for setup_response_handler.
Add jshintrc and fix warnings in main.js
Simplify error checks for the api calls

Check if *_id is a string. If not throw TypeError
in setup_response_handler call callback on the error event