moved the page refresh/load/update functions to their own javascript file