lots of doc restructuring to make it more api-agnostic