Refactored App 006 for clarity and fixed a number of fragment lifecycle issues