memory leaks fixed in model loader.