Refactored fixLinks method to Utils class