clean up top half of the file