Made use of the refactored out Resource class which deals with all of the behaviours associated with accessing a resource.