Moved configuration of TX to its own function. Fixed numerous bugs in PC, some still remain (see issue #6)