Some code reordering