More refactoring: extracting target class from context module