Refactored to make the interpreter OO