Added automatic removal of thread & breakpoint pointers and null checking.