Added tx and rx classes to simplify control