Added recursion and docstrings to njas.machine.scope