RefExtract: refactored book handling
Signed-off-by: Alessio Deiana <alessio.deiana@cern.ch> Tested-by: Tibor Simko <tibor.simko@cern.ch>