Synchronverters are inverters that mimic the behavior of synchronous generators. In this paper, we propose modifications to the synchronverter algorithm to improve its stability and performance. The proposed modifications are implemented in software and do not require any changes in the inverter hardware. The first two modifications concern the control of the virtual field current in the synchronverter to make it more robust to faults. The next modification is to increase the effective size of the filter inductors virtually. This is well-motivated theoretically, using results from the stability analysis of synchronous generators connected to a AC power grid, and also by practical considerations: it dramatically improves the response of converter to an imbalance in the grid. This modification necessitates a change in the formula for the (virtual) nominal active mechanical torque. The third modification is to split the frequency droop loop into a low-pass and a high-pass branch, with a saturation on the low-pass branch, to ensure that the synchronverter is not required to supply or absorb active power exceeding physically possible values. We demonstrate the efficacy of our modifications using both simulations and experiments.