Misc edits to JS