The first value is an integer and the second value is a string and the
format string has these backwards, leading to %!s(int=404) appearing
in the logs instead of "404".
This puts config in its relevant location and moves functions around
loading config files into the main package.
As a side effect of removing cyclic imports for the API config, the
context library is no longer used.