Added function to clean string