Cleaned up config handling slightly