Base commit with code by Mark Müller.