reduce global variables, got rid of rx cmd struct