Changed direction on JS implementation - now implementing as straight-up VM.