remove unused flags and css rules