Add caching of current header, add some docs.