Average quality reading and remove unused code