Abstracted away resource location and minor optimisations.