Implemented chomp and <STDIN> handlers