prleoad() function. Inject dependencies into a constructor

usage int the tests.