Adds deletes to remove memory leaks.