Sort out javascripts