Make variable context more manageable by putting them in a stack, which is essentially just an array manager. Unit test it to ensure it works.