App manager refactoring for careplan