refactoring before relative link greasing
now supports greasing some relative links