Move deletion into #remove_resource

Doing it here means that modules manually calling remove_resource won't
screw up the cleanup
Add a method for dealing with hardcoded URIs