Add a trim() method to clean up strings