Refactored AppWindow