Polish on the Serial API

Various improvements, including:

  * Draft documentation of the Serial API
  * Change example to match the revised API
  * Bug fixes for consistency