Fixed some obvious bugs with the new code and implemented If-Modified-Since handling