sed and perl: you are fired
C code slightly cleaned, now has 397 lines including asserts