Remove unnecessary characters