first commit. Added some small exeception handing to the net code