Rewrite working with configuration: create a single fn "config"