Code cleanup (Phase VI)
updated docs