Refactored the code related to update and forall interpreter.