Refactored the ripple feedback circuit on the switching regulator