Refactored the interpretation code so that it can be passed a scope to interpret rather than just always using the global scope.