additions to JS, other minor changes