move js to new file, maybe some other stuff