updated docs, fixed some small bugs