move newline removal out of Card class and into main method.