serialized cache rewrite plus minor fixes