Made character unsigned.
Formatting.
Documented error return values.
Documentation work.