Refactored how instructions are called and how memory is resolved