Improved handling of Persistence responses.

Rewrote the structs and parsing functions so only one type is needed.
Other parts of the program won't need to `static_cast` some pointers
potentially leading to a catastrophe.