code cleanup, proper async read/write, set_speed