Rearranged code.