moved javascript into their own files