Close channel to signal goroutines to quit and waitgroup to confirm that...

... they have

I've used the fact that a closed channel will always read to signal to the goroutines that they should quit rather than sending them individual quits on separate channels. Also use a sync.waitgroup to wait for them to quit rather than them sending messages back up another channel.