Added a function to calculate confidence value for reference links.
Added a logger.