Added closure value type, added global counting