Added documentation to JS scripts