Refactored fragment to activity for cleaner code