Refactor activities to fragments