Adds findVariable

And various other improvements