Delete QValue type and clean up various bits of code