Moved JS to separate file