Fixd many memroy-leaks