Feature/resource cleanup

This PR fixes #18.
Should this better be namespaced inside options, e.g. `options.relation[relationKey]`?