Added first version of cluster rule generation.