Some minor cleanups and added logging for range requests.