Making resource resolving a bit more general