Implemented local variable scoping rules