fixes

js cleanup and fixes