Cleaned up configuration handling.