Updated AppState.php