Moved percent variables to be global

Should make their values more persistent.