move mmi protocol to main.js