Refactor to single "primary target valid" function