Parse fixes, merge terms with same id: or alt_id:
Slight speedup after profiling
Remove extra newline before hash-bang