tweaks with jeffd (master)
defender and code drying (defender)