split JS into its own file