Wikipedia viewer scrolling issue, etc

My Wikipedia viewer is here.

It’s basically done, and I am pretty happy with how it came out, though maybe not with how I got there. There are a few issues:

  1. On the search results page, because of the way I generate the results, doing a new search without refreshing the page will result in the new search being added to the bottom rather than replacing the old results. Bug or feature? Either way I could not figure out how to change it without a massive overhaul.

  2. Because of how I use iframe, I could never figure out how to make clicking a search result appear in the iframe. Again, bug or feature? It might be better behavior the way it is.

  3. Lastly, on the search results page It never scrolls entirely to the end. The only thing that seems to fix it is to change the overflow of the whole page to auto, but that gives me a double scroll bar.