Made everything work.

The VM can now write and read from ram, changed a bit of stuff, but
everything works nonetheless.