make schema setup a lot more like the ruby library, and fix up event sets a bit.
compute next/prev so that paging will work.