more test + docs + cleanup