some clean up and reformat the indents of the codes