Pass config through more functions and fix dialyzer errors

Remove the dynamic function call on line 23. Only modules that define callbacks should make dynamic calls.