stbt.py: Corrections according to Dave's review comments