clean up file and fix text