memroy cleanup + data file composition improved