fixed doc deletion, hooked up refresh button to the frontend