Extract common packages into a module.