Reorder blocks of the code