Cleaned up config handling.