Merge "refactor cmsubscription code"