make document managet get_key method use kwargs
tons of little bug fixes from the unit tests