Move inline JS to a separate file