Remove extraneous code and normalize the code styling.