Allow selection of main textpane.
Added limit for buffer length.
Made command run in separate thread, and update output while command is running.