Optimize commander and smservice