moved named tuples to global scope; improved docs
documentation improvements