Changes made as per PMD2 to consume its own endpoint, tests updated as w...

...ell.