break long lines
fancy up the UI
break up api calls into logical groups of tokens that change together
extract polling from main control loop
whitespace
use jquery instead of appending script tags

jquery takes care of memory leaks
improved
update license