Move JS to own file