Fix grammar, wording and flow in the API documentation