Big update of docs including that for API.