Split javascript out into its own file