reindent and optimizations in BUFFER* struct.