Refactored fragment classes to manage de data with the app lifecycle