These are global variables! Could you scope them down into an object somehow?