refctor, add footer config, add caching