pdfs on PMC result list

pdf attachments were not showing up in the result lists of PMC, added them, and also did some cleanup and refactoring.

is there a way to have a real test for a result list? the test added just shows that the page would return multiple...
nit: for simple declarations, this would be fine. For something like pdf above, please make this clearer. I.e.
```
var pdf =...
  ...
  ...;
var pdfCollection = {};
```