Simplify.
Sync with latest mksmartvm script.