Moved config-related into a separate file