Moved JS to seperate file