Some more modifications on globals after Mark's feedback #6