better examples in docs, fixed some small bugs