Implemented some text based UI code and threading.