Rewrote anchor code. This looks a lot better.