Finishing moving js to its own file