changed notes to smart pointer
removed parent pointer and changed exception handling
added exception handling and changed notes to smart pointer, also some
minor fixes