move js stuff to a different file