fixed scooping issue - variables and functions are all now defined in user-specific environments (within the function passed to shiny).