refactored edit links page so it works