Extract to smaller methods