added HTTP headers callback, cleaned up  calls
added JSDoc comments - JSDoc won't generate HTML