cleanup of some with* functions