Global variables moved to globals infrastructure.

Signed-off-by: Mario Konrad <mario.konrad@gmx.net>