completed documentation, fixed minor bugs