Generate numeric array index===length when appending exactly to end of array.  Allowed by the rfc, and removes an extra comparison.  Other minor cleanup