Made fixes to router and document delete refresh