some memoryleaks fixed. More leaks to fix