- modernize Tcl (use byte-compiled comparisons, don't use numeric comparisons for string expressions, brace expressions)
- remove deprecated calls (ad_verify_and_get_user_id)
- use Tcl 8.5 idioms (range expressions)
- improve page contracts