Work on fixing the memory leaks, and the unbalanced show / dismiss calls.