Added split.py to test tri splitting and started to add it to the C code