update
Remove tmp.py
Add global cb to all routines referencing cb
Move setting switches to init mode.  Minor code cleanup.