updated to take command line arguments and all the tv control codes are instantiated