rearranged stuff and cleaned up bloat
moved XmlHttpRequest stuff to background.js and got caching working