Localise config and logging variables

Don't make these global just yet. There's no need to.