Refactoring pubmed_onebox