Basic JS updates

updates to JS basic functions