move config-related functionality to its own subpackage