Moved JS into separate file