Similar Items: A modular construction of type theories