Clean up javascript, remove errors