mms theme refactor