Adding length, caching headers, and stuff.