Initial, sort-of-working version. Committed as benchmark