Add Kalroth's latest changes.