Updated output so as to work correctly with other programs. Removed press key to exit.