ms: Begin to refactor and be able to share functionality

Change-Id: I840af0396f08744ce8ee6a2967f880d5cb7f815f
2 files changed