make the timeout generation into a function so that it'll work properly

basically wrapped it in a function and made getfresh call it rather than access a variable that otherwise wouldn't change. Also removed a big comment that "issues" replaces.