Added parallel thread for command execution, all console commands are run in this thread. Other minor changes.