Refactor emulator internals into their own module.
Finish stubbing out all opcodes
Add unit tests for existing instructions