fix the way that variable scoping works so that recursion isn't broken. It should be correct now. Next up are lambdas