Relax bytestring version
Misc clean up
Generalize and reuse virtual machines
Use unsafe array operations