curcuits current source process. minor refactoring.