Some more tweaks, cleaning up javascript