Create generic intermediate loader function

Don't repeat yourself

Change-Id: Icfbe13bff3b2592f8bd83a140e9e31cd4c1c3a5c
Merge "Create generic intermediate loader function"