split out the javascript into different files for easy management