improved mixed-indent and remove trailing character