Moved the js to its own file