Clean up blocks in Scratch

< Learn about Scratch

You can right click the gray in the code area and choose 'clean up blocks' to re-order the blocks.