Cleanup handling of c module widgets