get rid of while #t (thx sECuRE)
Shorten definition of line-transformers (thx sECuRE)
Avoid if-construct by using append (thx sECuRE)