cleaned up config loader