Improvements for references insertion and navegation

Allow going back to the original position after creating a reference.

Try to behave correctly when the navigation mark is not set.