Merge pull request #2 from sjoerdjob/master

Minor rewrite
Improved TLV debugging

[channels, logging, tlv]
- improved TLV debugging

[pbuffer]
- only move buffer to front when there is enough space