jats_package: duplicate code removal

Signed-off-by: Georgios Papoutsakis <georgios.papoutsakis@cern.ch>
Merge pull request #106 from GiorgosPa/jats

jats_package: duplicate code removal