Add variable/scope finding function. Part 4 finished.