added action bar buttons and methods for onDestroy, onPause and onResume