Add characteristic write value.

Also clean up trailing whitespace in some files.