Cleaned up config management code.