Couple of tips on the fence ...
Doesn't need to be a continous loop like others have said, the "loop" is completed when something touches the fence and the current runs through them, through the earth, to the ground.
You want to put your ground somewhere *wet* -- because I'm in the desert where it rains once or twice in the winter and half a dozen times in the summer, my ground is sunk under a faucet outside that is deliberately left to drip a bit. The earth the critter's touching doesn't need to be wet, but the ground needs to be in very damp earth to work properly. It's also possible to sink it into your septic tank leach field if you need a "wet spot" for it.
Use a LONG ground, several feet long.
The ground will have to be copper, but everything else should be aluminum because the fence wires are aluminum and you'll get corrosion if you mix copper and aluminum. WHat this means is that, yes, you should spring for the expensive insulated aluminum wires for burying the fence if you've got to go under a gate or doorway.
I've had a grass fire started by an arc from an electric fence ... if you've got long dry grass, use the fence with extreme caution. (In my case, it rained just a little, the fence arced, and started a fire that fortunately burned out in a few feet.)
Don't bet on the fence stopping large hairy dogs -- I had a chow get over my fence (4' of no-climb plus 2 strands of neg and pos electric on top). My guess is that he was so hairy he had sufficient insulation to avoid being zapped. He ALSO pulled a sturdy coop door off my hen house and killed a guinea and tore up a chicken.
Electric is great for discouraging digging, however ... a determined large dog can get through anything short of chain link or heavy-gauge no climb (welded wire will NOT stop a determined dog that knows to grab it and pull -- the welds will pop). So a combination of heavy fencing and electric is best if you really want to be secure.
You can add some extra oomph to your fence by running two strands, one positive and one wired to the ground, about 2" apart. Any animal that contacts both of those is in for a shock ...
Leva