v0.4

Big revision! Not backwards-compatible.
Added a demo.