Fix more memory leaks

Also added VLD to debug builds