Updated with changes from demo/basic.