Split the js into a separate file