Moved global vars from main into there own module