Remove unused C code for rule transitions
Remove unused C code for dynamic arrays
Clean up public headers