[TASK] Add method to detect variable namespace
[BUGFIX] Add missing method
[BUGFIX] Use local variable