Fix bugs.
Separate history and command line buffers.