changed header comment
refactored links processing
formatting
refactored to use map/filter for links
cleaned up '_self' and 'this'
fixed log level