coverage_key has now a proper domain; shifted some code around to avoid duplication of code