More code work on api send/read