Changes to make links connect to proper places and in right order.