Tweaks to movement threshold. Integrated new k-means color code