Added some error catching. Was occasionally having problems connecting causing a problem with the return value.
Removed some old code.
Added a chart which updates. This a experimental code and should removed and redone. Committed for sake of record.