These are actually really good ideas, I had never thought of it like this but I like it. History is really all you need in the end. Bookmarks are just a starred version of history, which could easily be included in the matching algorithm you're talking about.