improved html cleaning