Add and remove pins

Do you mean `function extractRes(docPage, typesPage, batchRes, cb)` ?