Remove extranous characters