Clean up emulator.h a bit
Fix broken test
Make Vec fromBits/toBits undo each other

Before, Vec.fromBits(Vec.toBits) reversed the Vec.