Remove unused things and deal with blank lines.