Added tests for PowerSource and Ground
Corrected a few bugs