cleanup and js tweaks