Updated changes to remove references to cout so that program will run without terminal