Various improvements taken from production.