simplify / style-tweak conditionals in master.py