Reworked request to depend less on the number of resources
Moving id branch of get to own function
Overriding structure functions with pairs to hide implementation details