[MS] Refactor commends.