Clean redundant characters, factor out comparison implementation into a strategy