First effort on docs, few typespecs fixed along the way