Made input stream a parameter everywhere.