Work on bad accesses and then memory leaks.

This must be converted, which means that we need to allocate new storage, which means that we need to do the same in the other case so that we can free consistently.