JS cleanup and updates