Split JavaScript into separate file