Refactoring
Utilize secondary sort and add GenerateModMat3.py