More valgrinding and fixing a serious mem leak - Alex