Checking disconnections, adding exceptions, closes #6.