Commands which do not fit in the buffer are assembled together.

Removed old commented out code.
Fixed exception handling which generated an exception...

I recommend actually reading the code before merging it despite the fact that I unit tested it.