use injected config object and fix typos