Core code for blueberry demo.
More illuminatory minimal example.