added 3 global vars to top of script for easy
end user access, updated comments