minor doc and style fix ups for encoder
diff --git a/src/qcbor_encode.c b/src/qcbor_encode.c
index 94448b5..5bab661 100644
--- a/src/qcbor_encode.c
+++ b/src/qcbor_encode.c
@@ -161,10 +161,10 @@
  until Finish is called. The CBOR errors are in me->uError.
  UsefulOutBuf also tracks whether the buffer is full or not in its
  context.  Once either of these errors is set they are never
- cleared. Only Init() resets them. Or said another way, they must
+ cleared. Only QCBOREncode_Init() resets them. Or said another way, they must
  never be cleared or we'll tell the caller all is good when it is not.
 
- Only one error code is reported by Finish() even if there are
+ Only one error code is reported by QCBOREncode_Finish() even if there are
  multiple errors. The last one set wins. The caller might have to fix
  one error to reveal the next one they have to fix.  This is OK.
 
@@ -177,34 +177,29 @@
  number of items in an array. It would save a lot of code, it is
  extremely unlikely that any one will every put 65,000 items in an
  array, and the only bad thing that would happen is the CBOR would be
- bogus.  Once we prove that is the only consequence, then we can make
- the change.
+ bogus.
 
  Since this does not parse any input, you could in theory remove all
  error checks in this code if you knew the caller called it
  correctly. Maybe someday CDDL or some such language will be able to
  generate the code to call this and the calling code would always be
  correct. This could also automatically size some of the data
- structures like array/map nesting resulting in some good memory
+ structures like array/map nesting resulting in some stack memory
  savings.
 
- Errors returned here fall into three categories:
+ Errors returned here fall into two categories:
 
  Sizes
-   QCBOR_ERR_BUFFER_TOO_LARGE -- A buffer passed in > UINT32_MAX
+   QCBOR_ERR_BUFFER_TOO_LARGE -- Encoded output exceeded UINT32_MAX
    QCBOR_ERR_BUFFER_TOO_SMALL -- output buffer too small
 
-   QCBOR_ERR_ARRAY_NESTING_TOO_DEEP -- Too many opens without closes
+   QCBOR_ERR_ARRAY_NESTING_TOO_DEEP -- Array/map nesting > QCBOR_MAX_ARRAY_NESTING1
    QCBOR_ERR_ARRAY_TOO_LONG -- Too many things added to an array/map
 
  Nesting constructed incorrectly
    QCBOR_ERR_TOO_MANY_CLOSES -- more close calls than opens
    QCBOR_ERR_CLOSE_MISMATCH -- Type of close does not match open
    QCBOR_ERR_ARRAY_OR_MAP_STILL_OPEN -- Finish called without enough closes
-
- Bad data
-   QCBOR_ERR_BAD_SIMPLE -- Simple value integer not valid
-
  */
 
 
@@ -276,7 +271,7 @@
 {
    /*
     This code does endian conversion without hton or knowing the
-    endianness of the machine using masks and shifts. this avoids the
+    endianness of the machine using masks and shifts. This avoids the
     dependency on hton and the mess of figuring out how to find the
     machine's endianness.
 
@@ -317,7 +312,7 @@
        until all bits from uNumber have been encoded
        and the minimum encoding size is reached.
        Minimum encoding size is for floating point
-       numbers with zero bytes correctly.
+       numbers with zero bytes.
        */
       static const uint8_t aIterate[] = {1,1,2,4};
       uint8_t i;
@@ -340,8 +335,6 @@
 }
 
 
-
-
 /*
  Append the type and number info to the end of the buffer.
 
@@ -361,6 +354,7 @@
 
 
 
+
 /*
  Public functions for closing arrays and maps. See header qcbor.h
  */
@@ -410,7 +404,7 @@
  */
 void QCBOREncode_AddBuffer(QCBOREncodeContext *me, uint8_t uMajorType, UsefulBufC Bytes)
 {
-   if(!me->uError) {
+   if(me->uError == QCBOR_SUCCESS) {
       // If it is not Raw CBOR, add the type and the length
       if(uMajorType != CBOR_MAJOR_NONE_TYPE_RAW) {
          AppendEncodedTypeAndNumber(me, uMajorType, Bytes.len);
@@ -434,8 +428,6 @@
 }
 
 
-
-
 /*
  Semi-private function. It is exposed to user of the interface,
  but they will usually call one of the inline wrappers rather than this.
@@ -482,7 +474,7 @@
 {
    // Add one item to the nesting level we are in for the new map or array
    me->uError = Nesting_Increment(&(me->nesting));
-   if(!me->uError) {
+   if(me->uError == QCBOR_SUCCESS) {
       size_t uEndPosition = UsefulOutBuf_GetEndPosition(&(me->OutBuf));
       if(uEndPosition >= UINT32_MAX-sizeof(uint64_t)) {
          me->uError = QCBOR_ERR_BUFFER_TOO_LARGE;
@@ -502,7 +494,7 @@
                                  uint8_t uMajorType,
                                  UsefulBufC *pWrappedCBOR)
 {
-   if(!me->uError) {
+   if(me->uError == QCBOR_SUCCESS) {
       if(!Nesting_IsInNest(&(me->nesting))) {
          me->uError = QCBOR_ERR_TOO_MANY_CLOSES;
       } else if(Nesting_GetMajorType(&(me->nesting)) != uMajorType) {
@@ -550,6 +542,7 @@
 
 
 
+
 /*
  Public functions to finish and get the encoded result. See header qcbor.h
  */
@@ -614,7 +607,7 @@
  6                   QCBOREncode_AddTag
  7                   QCBOREncode_AddDouble, QCBOREncode_AddType7
 
- Object code sizes on X86 with LLVM compiler and -Os (Dec 14, 2018)
+ Object code sizes on X86 with LLVM compiler and -Os (Dec 30, 2018)
 
  _QCBOREncode_Init   69
  _QCBOREncode_AddUInt64   76