Changed to BufferedReader instead of Scanner.