Performance increase

Changed scale and normlisation loops.
Added GMM test.