Added documentation to JS