Improve configuration and reduce duplication of etags-running code