move javascript into individual files