code beautification, implementing CC cache in one place only