refactor AppMaster