Cleaning repetitive code

we can move the `set_output` in both `voltagesource` and `currentsource` to the source class.