Added state stack for navigation in the application