Implemented __del___ where it makes sense. Shored up some tests. Refactored exceptions some.