Tweaked countdown code and added code for graph plotting.