Refactor AppFrame