basic app delegate refactor