delete,thumbnail display working, memory leaks look solved