updated the documentation; generally fixes