Moving js stuff to different file