cleans up config