Checking for redundant characters