searching functionality added to library & re-structured some of the publish functions