moves list javascript to separate file and out of html script tags