Added some simple optimizations to GMM
Merge branch 'origin/master'