clean up config code