Removing references to stuff that is not committed yet