more splitting of c/python code