minor tweaks to token and tray code
updated cloud code to be more consistent