Reformatting function and comments