Restructure URSessionDelegate