Moved some variables to global status