Small code rearrange