Typedoc rebased

Like #1627 but rebased on newest master.