fixed  the last memory leaks. The engine is now memory leak free...