Reformatting of the code to be easier to understand