Moving js to its own file