Extract duplication to module.