Factor out polling loop components into seperated functions.
Factor out polling loop components into seperated functions.

Implement str2token and strcmp for command parsing

gregwym/PollingTrainControlPanel,gregwym/PollingTrainControlPanel,gregwym/PollingTrainControlPanel