Pass config through more functions and fix dialyzer errors

Missing space after "," on line 10