Move list logic to a fragment.