updated docs, fixed few bugs