added in-memory cache, some renaming
renamed header