Rename string_buffer to string
Handle UI events in a separate thread