finish docs and make various small fixes