Breakout network code to send_command method
Breakout selection code into get_selectiot
Use a logger