Added more documentation to JS