Cleanup and refactoring along with an update of the interpreter design doc