vm: Rewrite for better usability.