reformat all the code

formatted all the code to the present style.