Added a more realistic resistor model.