Made `doc` and `win` arguments optional.