wrote docs, fixed some stuff