Some valgrind tests suggest leaks are coming from this class. Indeed it looks like it could leak in certain situations. I have adjusted some allocations to avoid raw
new to prevent leaks.
Valgrind reports show memory leaks in this class. Indeed it looks like it leaks in certain situations. I have changed the variable to stack based optionals to avoid allocations and memory leaks.