New tools for Bayesian clustering and factor analysis