FIXED:
I fixed it guys. If anyone wants to use this script for whatever purpose to gather all groups of factions and place them under each seperate category. Here it is:
This project was originally started so that I can push myself to learn a new workflow and this Reptilia mount is the first mesh I've created in that workflow. I'm very happy with the first result of this new workflow. Hopefully, the results will only improve from here.