Cleaning up config code