refactor
refactor fixes
refactor links loop fix
ref