Remove redundant characters