removed all memory leaks and memory issues till date