Registred global variables and added them to the objects thus removing recusions.