delete button works

and some cleaning up