move javascript

move javascript so its easier to work with