Fixed auto scroll issue.
Added clear() function to clear output from cmdline.