Modified the instruction memory to use lists:

- Changed to lists for faster element retrieval
- Instruction keys are now a tuple of a memory idx and a key