First part of commit removing xprintf to make later merging easier