Yet more changes to the unfocus feature to work on more sites
DRY up some code