minor fixes/cleanup
global var