More test  / Memory leaks fixes / Bug fix