Valgrind seem to work fine after the memcpy overrides have been removed, but as always I don't really know what I am doing.