Found a good kmeans library that doesn't require matlab. Will implement.