Minor code rearrangement
Add comment