Some reformatting of the code