Fix conversions between native and JavaScript instruction structures

- Also make tests readable!