Added in-line documentation to JS file