code blocks are mis-placed

The code blocks do not align with what is being described above them. Re-arranging them in proper places now.