Implemented JH's changes down to typeOfResource-class