Added etag and last-modified conditional get and refactored a little.