Instance refactoring

OK. I'm not a bit fan of looking up specific resource parameters, but I can see the logic.