dos2unix and some removal of dead code