remove some old stuff and improve edit and delete