Made clustering more applicable to multiple header types.