Wrote an extensive example, small bugfixes.