Added savedInstanceState functionality.