Optimal gmm is only trained once, potential speedup, fixes #30